home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsServerHash.inc"-->
- <!--#include file="include/wmsPlugins.inc"-->
- <!--#include file="include/wmsHeader.inc"-->
- <!--#include file="include/wmsPageBanner.inc"-->
- <!--#include file="include/wmsError.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: AuthenRealmAdmin.asp
- '
- ' Contents:
- '
- '--------------------------------------------------------------------------
-
- ConnectToPlugin
- ConnectToPluginAdmin
-
- BeginErrorHandling
-
- on error resume next
-
- Dim bError
- dim strRealm
- Dim dwTabIndex
- dwTabIndex = 0
-
- strRealm = RemoveSpecifiedChars( SafeUnescape( GetFormStr( "realm" ) ), REGEXP_DANGEROUS_CHARS )
-
- Dim strOp
- strOp = trim( posting( "submit" ) )
- if( 0 < Len( strOp ) ) then
- if ( 0 >= Len( strRealm ) ) then
- err.raise( -1 )
- err.description = RemoveDangerousCharacters( L_SPECIFYREALM_TEXT )
- ErrorDetected( "Realm" )
- Session( "PageReloadedToDisplayError" ) = 1
- bError = TRUE
- else
- if( MAX_LEN_REALM >= Len( CStr( strRealm ) ) ) then
- g_objPluginAdmin.Realm = CStr( strRealm )
- end if
-
- if( ErrorDetected( "Realm" ) ) then
- Session( "PageReloadedToDisplayError" ) = 1
- bError = TRUE
- else
- if( 0 < Len( g_strEncodedPubPointName ) ) then
- Response.Redirect( "../pubpoints/pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex") )
- else
- Response.Redirect( "../server_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex") )
- end if
- end if
- end if
- else
- strRealm = SafeUnescape( CStr( g_objPluginAdmin.Realm ) )
- end if
-
- WriteHTMLHeader( g_strDecodedServerName )
- %>
- <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
- <% WritePluginJSUtils %>
- <script language="JavaScript">
- <!--
- /*@cc_on @*/
-
- //////////////////////////////////////////////////////////////////////////////////
- function ValidateInput()
- {
- <% jsTRY %>
- var bEnableOkay = true;
- var szRealmUnfiltered = new String( document.pluginForm.realm.value );
- var szRealmFiltered = "";
-
- // perform left trim
- szRealmUnfiltered = szRealmUnfiltered.replace( /^\s+/, "" );
-
- // perform right trim
- szRealmUnfiltered = szRealmUnfiltered.replace( /\s+$/, "" );
-
- if( 0 == szRealmUnfiltered.length )
- {
- document.pluginForm.ok.disabled = true;
- return( false );
- }
-
- if( bEnableOkay )
- {
- szRealmFiltered = szRealmUnfiltered.replace( /\`|\'|!|@|#|\$|%|\^|\&|\||{|}|;|:|\<|\>|\?|\"/g, "" );
- if( szRealmUnfiltered != szRealmFiltered )
- {
- bEnableOkay = false;
- }
- }
-
- if( bEnableOkay )
- {
- document.pluginForm.realm.style.color = "#000000";
- document.pluginForm.ok.disabled = false;
- }
- else
- {
- document.pluginForm.realm.style.color = "#ff0000";
- document.pluginForm.ok.disabled = true;
- }
-
- return( ! document.pluginForm.ok.disabled );
- <% jsCATCH %>
- return( true );
- }
- -->
- </script>
- </head>
- <body class="pluginBody" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
- <% DrawPluginBanner %>
- <table width="90%">
- <tr>
- <td valign=top>
-
- <% WriteStdPluginForm %>
-
- <table class="propgroupbox" width="90%" cellspacing="0" cellpadding="3">
- <tr>
- <td>
- <div class="helptext" align="left"><%= Server.HTMLEncode( L_DIGESTHELP_TEXT ) %></div><br>
- </td>
- </tr>
- <tr>
- <td>
- <div class="helptext"><% RenderWithErrorCheck Server.HTMLEncode( L_REALMCOLON_TEXT ) , "Realm" %><br></div>
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="text"
- name="realm"
- maxlength="<%= Server.HTMLEncode( MAX_LEN_REALM ) %>"
- value="<%= RemoveSpecifiedChars( strRealm, REGEXP_DANGEROUS_CHARS ) %>"
- tabindex="1"
- onChange="JavaScript:ValidateInput();"
- onPaste="JavaScript:ValidateInput();"
- onKeyDown="JavaScript:ValidateInput();"
- onKeyUp="JavaScript:ValidateInput();"
- ><br>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
- <tr>
- <td valign=bottom>
- <input type="submit" align="baseline" name="ok" value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>" ID="ok" tabIndex=2>
- <input type="button" align="baseline" name="cancel" onclick="JavaScript:Cancel();" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" tabIndex="3">
- <input type="button" align="baseline" name="help" onclick="JavaScript:DoPluginHelp( '<%= H_AUTHENHTTPBASICHELPTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id="help" tabindex=4>
- </td>
- </tr>
- </table>
- </font>
- </form>
- <%
- AlertUserWithPopupErrorDialog
- OnErrorGoBack
- DrawStdFooter
- %>
- </body>
- </html>
- <%
- LatchCurrentPage "plugins/AuthenRealmAdmin.asp", qs
- EndErrorHandling "AuthenRealmAdmin.asp"
-
- on error resume next
- PluginsASPCleanup
- %>